package com.songshuai.webapi.permission.dao;

import com.songshuai.webapi.permission.dto.po.QuickPositioningUserReqPojo;
import com.songshuai.webapi.permission.dto.response.QuickPositioningUserRespDto;
import com.songshuai.webapi.permission.model.YxUserRoles;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;

/**
 * YxUserRolesDAO继承基类
 */

public interface YxUserRolesMapper {

    Integer insert(YxUserRoles yxUserRoles);

    Integer deleteByRoleId(Integer roleId);

    List<Integer> queryUserIdsByRoleId(Integer roleId);

    Integer delUserRoleById(@Param("roleId")Integer roleId,@Param("userId")Integer userId);

    Integer insertBatch(List<YxUserRoles> list);

    Integer countRoleUser(Integer roleId);

    int checkIsSysAdmin(Integer userId);

    List<QuickPositioningUserRespDto> queryUserNameInfos(QuickPositioningUserReqPojo quickPositioningUserReqPojo);

    List<Integer> queryAllUserId();

    Integer delByUserIdSet(@Param("userIdSet")Set<Integer> userIdSet);

    Set<Integer> queryAllUserIdByRoleId(Integer roleId);

}